package com.interview.javabasic.tests;/*
@李子宁
Happy,happy everyday!
冲鸭！
*/

import java.util.Scanner;

public class zoufangge {
    public static void main(String[] args) {
        System.out.println("请输入方格的大小：");
        Scanner in = new Scanner(System.in);
        int x = in.nextInt();
        int y = in.nextInt();
        System.out.println(count(x,y));
    }
    public static int count(int x,int y){
        if (x==1 && y == 1) return 0;
        if (x==1 || y == 1) return 1;
        if (x>1 && y > 1){
            return count(x-1,y)  +count(x,y-1);
        }
        return 0;
    }
}
